<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>金币录入管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {	
			$("a[data-href='.menu3-98']",parent.document).parent().parent().children('li').attr('class','');
			$("a[data-href='.menu3-98']",parent.document).parent().attr('class','active');
		});		
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<!--  <ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/goldinput/goldcoin/">金币录入审核</a></li>
		<shiro:hasPermission name="goldinput:goldcoin:edit"><li><a href="${ctx}/goldinput/goldcoin/form">金币录入添加</a></li></shiro:hasPermission>
	</ul>-->
	<form:form id="searchForm" modelAttribute="goldcoinWapper" action="${ctx}/goldinput/goldcoin/list?branchId=${goldcoinWapper.branchid}"   method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}" callback="page();"/>
		<ul class="ul-form">
			<li><label>名称</label>
				<form:input path="goldcoinname"  value="${goldcoinWapper.goldcoinname }" htmlEscape="false" maxlength="80" class="input-medium"/>
			</li>
			
			<li><label >金币所属活动</label>
				<form:input path="activityname" value="${goldcoinWapper.activityname }" htmlEscape="false" maxlength="5" class="input-medium"/>
			</li>
			<li><label>每页</label>
			<select id="pageSize" name="pageSize" class="input-small">
				<option value="20"    <c:choose><c:when test="${page.pageSize=='20'}">selected=true</c:when></c:choose>>20</option>
				<option value="100"   <c:choose><c:when test="${page.pageSize=='100'}">selected=true</c:when></c:choose>>100</option>
				<option value="500"   <c:choose><c:when test="${page.pageSize=='500'}">selected=true</c:when></c:choose>>500</option>
				<option value="1000"  <c:choose><c:when test="${page.pageSize=='1000'}">selected=true</c:when></c:choose>>1000</option>
			</select>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th	class="sort-column goldcoinname"  >序号</th> 
				<th	class="sort-column goldcoinname">名称</th>
				<th	class="sort-column goldcoinmark">标识</th>
				<th	class="sort-column goldcoinactivity">金币所属活动</th>
				<th	class="sort-column goldcoincollectionstart">金币领取开始时间</th>
				<th	class="sort-column goldcoincollectionend">金币领取结束时间</th>
				<th	class="sort-column goldcoinvaliditystyle">金币有效时间</th>
				<th	class="sort-column goldcoinlimitnumber">限领个数</th>
				<th	class="sort-column goldcoindistributiontotalnumber">发行总个数</th>
			<!-- 	<th	class="sort-column goldcoinvaliditystart">金币有效开始时间</th>
				<th	class="sort-column goldcoinvalidityend">金币有效结束时间</th>
				<th	class="sort-column goldcoinvalidityday">金币有效天数</th> -->
				<th	class="sort-column status">状态</th>
				
				<shiro:hasPermission name="goldinput:goldcoin:edit">
				<th class="sort-column goldcoinname" >操作</th>
				</shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="goldcoin"   varStatus="i">
			<tr>
			 	<td> ${i.index+1}</td> 
				<td>
					${goldcoin.goldcoinname}
				</td>
				<td>
					${goldcoin.goldcoinmark}
				</td>
				<td>
					${goldcoin.activityname}
				</td>
				<td>
					<fmt:formatDate value="${goldcoin.goldcoincollectionstart}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</td>
				<td>
					<fmt:formatDate value="${goldcoin.goldcoincollectionend}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</td>
							<td>
				<c:if
				  test="${'01' eq goldcoin.goldcoinvaliditystyle}"><fmt:formatDate value="${goldcoin.goldcoinvaliditystart}" pattern="yyyy-MM-dd HH:mm:ss"/> 至      <fmt:formatDate value="${goldcoin.goldcoinvalidityend}" pattern="yyyy-MM-dd HH:mm:ss"/> </c:if>	
			<c:if
				  test="${'02' eq goldcoin.goldcoinvaliditystyle}"><fmt:formatDate value="${goldcoin.goldcoincollectionstart}" pattern="yyyy-MM-dd HH:mm:ss"/> 至      <fmt:formatDate value="${goldcoin.goldcoinvalidityend}" pattern="yyyy-MM-dd HH:mm:ss"/> </c:if>	
			<c:if
				  test="${'03' eq goldcoin.goldcoinvaliditystyle}">
				  <fmt:formatDate value="${goldcoin.goldcoincollectionstart}" pattern="yyyy-MM-dd HH:mm:ss"/> 至   
				<fmt:formatDate value="${goldcoin.goldcoininvalidity}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</c:if>
				</td>
				<td>
					${goldcoin.goldcoinlimitnumber}
				</td>
				<td>
					${goldcoin.goldcoindistributiontotalnumber}
				</td>
		
			<%-- 	<td>
					${goldcoin.goldcoinvalidityday}
				</td> --%>
				<td>
				<c:if
				  test="${'01' eq goldcoin.status}">审核中</c:if>	
				</td>
				<shiro:hasPermission name="goldinput:goldcoin:edit"><td>
    				<a href="${ctx}/goldinput/goldcoin/getGoldcoinWapper?goldcoinid=${goldcoin.goldcoinid}">审核</a>
					<%-- <a href="${ctx}/goldinput/goldcoin/delete?id=${goldcoin.id}" onclick="return confirmx('确认要删除该金币录入吗？', this.href)">删除</a> --%>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>